#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
const int N = 210;
char s1[N], s2[N];
vector<int> v1, v2;
int n, t;
int main()
{
    scanf("%d", &t);
    while (t--)
    {
        v1.clear();
        v2.clear();
        scanf("%d", &n);
        scanf("%s", s1 + 1);
        for (int i = 1; i <= n; i++)
        {
            if (s1[i] == 'B') s1[i] = 1;
            else s1[i] = 0;
        }
        memcpy(s2, s1, sizeof s1);
        for (int i = 1; i < n; i++)
        {
            if (s1[i] != 1)
            {
                s1[i] ^= 1;
                s1[i + 1] ^= 1;
                v1.push_back(i);
            }
        }
        for (int i = 1; i < n; i++)
        {
            if (s2[i] != 0)
            {
                s2[i] ^= 1;
                s2[i + 1] ^= 1;
                v2.push_back(i);
            }
        }
        if (s1[n] != 1 && s2[n] != 0) printf("-1\n");
        if (s1[n] == 1)
        {
            printf("%d\n", v1.size());
            for (auto e : v1) printf("%d ", e);
            if (v1.size()) puts("");
        }
        else if (s2[n] == 0)
        {
            printf("%d\n", v2.size());
            for (auto e : v2) printf("%d ", e);
            if (v2.size()) puts("");
        }
    }
    return 0;
}